package stream;

import pojo.Student;

import java.util.stream.Collectors;
import java.util.stream.Stream;

public class JoiningStream {
    public static void main(String[] args) {
        Stream<Student> stream = Stream.of(
                new Student("101", "猪八戒", 80),
                new Student("102", "孙悟空", 80),
                new Student("103", "撒僧", 80),
                new Student("104", "小白龙", 100),
                new Student("105", "唐僧", 100)
        );
        String result = stream.map(s -> s.getName()).collect(Collectors.joining("==","--","++"));
        System.out.println("result = " + result);
    }
}
